<div id="item_pager" class="jqpager" style="margin-top:5px;overflow:hidden;display:inline;float:right"></div>		
<div style="display: inline-table; width: auto; margin-bottom:5px">
  <!-- <select class="form-control" id="youzan-shop">
    <option value="">请选择有赞店铺</option>
  </select> -->
  <input id="youzan-shop" type="hidden" value="#(shop.id??)"/>
  有赞店铺：#(shop.shop_name??)
</div>
<table class="table table-striped table-bordered" id="mainProductTable" style="padding-top: 5px;" border="0">
	<thead>
		<tr>
			<th><input type="checkbox" id="all" title="全选/反选" style="margin-right: 4px; vertical-align: middle;"/></th>
			<th><span style="vertical-align: middle;">&nbsp;&nbsp;商品</span></th>
			<th>商品地址</th>
			<th>创建时间</th>
		</tr>
	</thead>
	<tbody class="productLotGrid"></tbody>
</table>
<!-- html 模板文件 -->
<script type="text/template" id="product_table_tr_tpl">
{{each list as item i}}
<tr id="tr_id_{{item.itemId}}" class="package" data-id="{{item.itemId}}" data-title="{{item.title}}" data-digest="{{item.shareTitle}}" data-image="{{item.image}}" data-url="{{item.url}}">
	<td><input type="checkbox" class="commchk" id="checkbox_{{item.itemId}}" style="margin-right: 4px; vertical-align: middle;"/></td>
	<td><img width="40" height="40" src="{{item.image}}"><a class="new-window" href="javascript:void(0)" title="{{item.title}}">&nbsp;{{item.simpleTitle}}</a></img></td>
	<td><a href="{{item.url}}" target="_blank">访问商品</a></td>            
    <td><span>{{item.createdTime}}</span></td>
</tr>
{{/each}}
</script>
<script type="text/template" id="table_noresult_tr_tpl">
	<tr class="package"><td class="center" colspan="4">没有数据</td></tr>
</script>
<script type="text/template" id="option_tpl">
	<option value="{{id}}">{{shopName}}</option>
</script>
<script type="text/javascript">
$().ready(function(){
	var params = {};
	params.shopId = $("#youzan-shop").val();

	if(params.shopId == null || params.shopId == ""){
		return;
	}

	
	
	var table = new obz.TableView("item_pager", "#(webctx)/product/youzan/list", params, function(resp){
		if(resp && resp.list && resp.list.length>0){
			$('.productLotGrid').html(template('product_table_tr_tpl', resp));
			TBatch.tableId = "mainProductTable";
			//初始化checkbox点击事件
			TBatch.checkCheckbox();
			TBatch.initCheckboxClick();
		}
	}); 
	table.init();
});
</script>